import React ,{Component} from 'react';
import echarts  from 'echarts';
import './style/content.css';

class Content extends Component{
    constructor(props){
        super(props)
    }
    componentDidMount(){
        var chart = echarts.init(document.querySelector('.content'));
        
        chart.setOption({
            grid:{
                left:0,
                right:0,
                top:0,
                bottom:20,
            },
            xAxis: {
            },
            yAxis: {    
            },
            series: [{
                type: 'line',
                data: [[0,100], [2,-100], [3,99], [4,-99], [5,96], [6,-96],[7,50],[8,-50],[9,49],[10,-49]],
                symbol:'none',
                smooth:true,
            }]
        });
        window.onresize = function(){
            setTimeout(function(){
            chart.resize();
            console.log(1);
            },100);
        }
        
    }
    render(){
        return(
            <div className="content">
                
            </div>
        )
    }
}

export default Content;